# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DFAReporting.V4.Model.ReportCrossDimensionReachCriteria do
  @moduledoc """
  The report criteria for a report of type "CROSS_DIMENSION_REACH".

  ## Attributes

  *   `breakdown` (*type:* `list(GoogleApi.DFAReporting.V4.Model.SortedDimension.t)`, *default:* `nil`) - The list of dimensions the report should include.
  *   `dateRange` (*type:* `GoogleApi.DFAReporting.V4.Model.DateRange.t`, *default:* `nil`) - The date range this report should be run for.
  *   `dimension` (*type:* `String.t`, *default:* `nil`) - The dimension option.
  *   `dimensionFilters` (*type:* `list(GoogleApi.DFAReporting.V4.Model.DimensionValue.t)`, *default:* `nil`) - The list of filters on which dimensions are filtered.
  *   `metricNames` (*type:* `list(String.t)`, *default:* `nil`) - The list of names of metrics the report should include.
  *   `overlapMetricNames` (*type:* `list(String.t)`, *default:* `nil`) - The list of names of overlap metrics the report should include.
  *   `pivoted` (*type:* `boolean()`, *default:* `nil`) - Whether the report is pivoted or not. Defaults to true.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :breakdown => list(GoogleApi.DFAReporting.V4.Model.SortedDimension.t()) | nil,
          :dateRange => GoogleApi.DFAReporting.V4.Model.DateRange.t() | nil,
          :dimension => String.t() | nil,
          :dimensionFilters => list(GoogleApi.DFAReporting.V4.Model.DimensionValue.t()) | nil,
          :metricNames => list(String.t()) | nil,
          :overlapMetricNames => list(String.t()) | nil,
          :pivoted => boolean() | nil
        }

  field(:breakdown, as: GoogleApi.DFAReporting.V4.Model.SortedDimension, type: :list)
  field(:dateRange, as: GoogleApi.DFAReporting.V4.Model.DateRange)
  field(:dimension)
  field(:dimensionFilters, as: GoogleApi.DFAReporting.V4.Model.DimensionValue, type: :list)
  field(:metricNames, type: :list)
  field(:overlapMetricNames, type: :list)
  field(:pivoted)
end

defimpl Poison.Decoder, for: GoogleApi.DFAReporting.V4.Model.ReportCrossDimensionReachCriteria do
  def decode(value, options) do
    GoogleApi.DFAReporting.V4.Model.ReportCrossDimensionReachCriteria.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DFAReporting.V4.Model.ReportCrossDimensionReachCriteria do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
